<link rel="stylesheet" href="{{ getAssets }}js/autocompleter/jquery.autocompleter.css?v={{ assets_version }}">
<style>.am-table>thead>tr>th{ padding:0.5rem;}</style>
<div class="widget am-cf">
    <div class="widget-head am-cf">
        <div class="widget-title  am-fl">前台配镜</div>
        <div class="widget-function am-fr">
        	<a href="javascript:;" onclick="history.go(-1);return false;" class="am-btn am-btn-default am-round"><span class="am-icon-mail-reply"></span> 返回</a>
        </div>
    </div>
    <div class="widget-body  am-fr">
        <form class="am-form tpl-form-line-form" data-am-validator id="formDoSubmitDialogPayForm" style="padding-top:0;">
        
          <input type="hidden" name="Typeid" id="Typeid" value="{{.tid}}">
          
          <input type="hidden" name="Id" id="Id" value="{{.m.Id}}">
          <input type="hidden" name="Rowsnum" id="rows_num" value="" />
          <input type="hidden" name="PaymentType" value="0" id="payment_type" />
          <input type="hidden" id="payment_type_money" name="PaymentMoney" />
          <input type="hidden" id="cash_money" name="CashMoney" />
          <input type="hidden" id="optometry_id" name="optometry_id" />
            <div class="frame am-cf">
                
              <div class="am-form-group am-u-sm-12 am-u-md-6 am-u-lg-4">
                  <label class="am-u-sm-2 am-form-label">手机：</label>
                  <div class="am-u-sm-10">
                       <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                            <input type="text" class="am-form-field am-input-sm" id="Mobile" name="Mobile" placeholder="输入手机号" required>
                            <span class="am-input-group-btn">
                                <button class="am-btn  am-btn-default am-btn-warning tpl-table-list-field am-icon-search" type="button" id="searcharchives"></button>
                            </span>
                        </div>
                   </div> 
              </div>
              <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                  <label class="am-u-sm-2 am-form-label">姓名：</label>
                  <div class="am-u-sm-10">
                       <input name="Realname" type="text" id="Realname" class="am-input-sm"  placeholder="长度不超过20" maxlength="20" required/>
                   </div> 
              </div>
            
              <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                  <label class="am-u-sm-2 am-form-label">性别：</label>
                  <div class="am-u-sm-10">
                          <label class="am-radio-inline">
                            <input type="radio"  name="Sex" value="男" required> 男
                          </label>
                          <label class="am-radio-inline">
                            <input type="radio" name="Sex" value="女"> 女
                          </label>
                   </div> 
              </div>
            </div>
            <div class="frame am-cf">
              <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                  <label class="am-u-sm-2 am-form-label">年龄：</label>
                  <div class="am-u-sm-10">
                       <input name="Age" type="number" id="Age"  class="am-input-sm" placeholder="必须是一个数字" required/>
                   </div> 
              </div>
              <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                  <label class="am-u-sm-2 am-form-label">生日：</label>
                  <div class="am-u-sm-10">
                       <input name="Birthday" type="text" id="Birthday"  class="am-input-sm" placeholder="请选择出生年月" data-am-datepicker readonly />
                   </div> 
              </div>
              <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                  <label class="am-u-sm-2 am-form-label">地址：</label>
                  <div class="am-u-sm-10">
                       <input name="Address" type="text" id="Address"  class="am-input-sm" placeholder="请输入所在地址"/>
                  </div> 
              </div>
          </div>
         
         <div class="frame am-cf">
            <div class="am-form-group am-u-sm-12" style="max-height:400px; overflow:auto;">
                <table class="am-table am-table-bordered am-text-sm" id="no-input-border">
                    <thead>
                        <tr>
                            <td colspan="3" style="border-bottom:0; line-height:32px;">
                                <label class="am-checkbox-inline" style="margin-left:10px;">
                                  <input type="checkbox" name="IsCustomized" id="is_customized" value="1" data-am-ucheck > 镜片定制
                                </label>
                                &nbsp;&nbsp;*选择定制镜片请填写定制的度数
                            </th>                                                          
                            <td colspan="7" style="border-bottom:0; border-left:0;line-height:32px; text-align:right;">
                            	<label class="am-radio-inline">
                                  <input type="radio" name="used" id="is_yuan" value="1" data-am-ucheck checked> 远用验光
                                </label>
                                <label class="am-radio-inline">
                                  <input type="radio" name="used" id="is_jin" value="1" data-am-ucheck > 近用验光
                                </label>
                            </td>                            
                            <td colspan="2" style="border: none; text-align:right;">
                              <a href="javascript:;" class="am-btn am-btn-warning" id="addgroup">增加一组</a>
                              <a href="javascript:;" class="am-btn am-btn-secondary" id="addone">增加一个</a>
                            </td>
                        </tr>
                        <tr style="background-color:#E0E8FF;text-align:center;">
                            <td>&nbsp;</td>
                            <td width="5%">左右</td>
                            <td width="20%">商品</td>
                            <td>屈光度</td>
                            <td>散光度</td>
                            <td>规格</td>
                            <td>色号</td>
                            <td>数量</td>
                            <td>原价</td>
                            <td>折扣</td>
                            <td>实售价</td>
                            <td>小计金额</td>
                        </tr>
                    </thead>
                    <tbody id="add_products"></tbody>
                </table>
            </div>
         </div>
         
         <div class="frame am-cf">
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">总计：</label>
                    <div class="am-u-sm-10">
                         <input name="TotalMoney" type="text" id="total_money"  class="am-input-sm" placeholder="总金额" readonly />
                    </div>
                </div>
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">调减：</label>
                    <div class="am-u-sm-10">
                         <input name="ChangesMoney" type="number" id="changes_money"  class="am-input-sm" value="0.00" onkeyup="cal_discount_price();" />
                    </div>
                </div>
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">应收：</label>
                    <div class="am-u-sm-10">
                         <input type="text" id="payment_money" name="SumPayable"  class="am-input-sm" placeholder="应收金额" readonly />
                    </div>
                </div>
            </div>
            <div class="frame am-cf">
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">营业员：</label>
                    <div class="am-u-sm-10">
                         <input type="hidden" id="BusinessName" name="BusinessName" />
                         <select data-am-selected="{width:'100%',dropUp: 1}" class="am-input-sm" name="BusinessId" id="business_id" required />
                            <option value=""></option>
                            {{range $k, $v := .business}}
                                <option value="{{$v.Id}}">{{$v.OptionName}}</option>
                            {{end}}
                          </select>
                    </div>
                </div>
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">单据号：</label>
                    <div class="am-u-sm-10">
                         <input name="ManualNumber" type="text" id="manual_number" value="{{.ManualNumber}}"  class="am-input-sm" placeholder="单据号" required />
                    </div>
                </div>
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">日期：</label>
                    <div class="am-u-sm-10">
                         <input type="text" id="created_at" name="created_at" value="{{.nowDate}}" class="am-input-sm" placeholder="日期" data-am-datepicker readonly />
                    </div>
                </div>
                
            </div>
            <div class="frame am-cf">
                <div class="am-form-group">
                    
                </div>
                <div class="am-form-group  am-u-sm-12 am-u-md-6 am-u-lg-4">
                    <label class="am-u-sm-2 am-form-label">备注</label>
                    <div class="am-u-sm-10">
                         <textarea placeholder="备注信息" name="Remarks"></textarea>
                    </div>
                </div>
            </div>
          
         <div class="am-form-group am-u-sm-12 am-u-md-12 am-u-lg-4 am-margin-vertical-sm">
              <button class="am-btn am-btn-danger" type="button" id="formDoSubmitDialogPay">确 认 落 单</button>
                &nbsp;&nbsp;&nbsp;
              <button type="button" class="am-btn am-btn-default am-radius" onclick="history.go(-1);return false;">返回</button>
          </div>
          <div class="am-form-group am-u-sm-12 am-u-md-12 am-u-lg-4 am-margin-vertical-sm">
            <div class="am-fr">
              <a  class="am-btn am-btn-primary am-radius am-btn-sm" id="view-optometry">验光数据</a>
              &nbsp;&nbsp;&nbsp;
              <a  class="am-btn am-btn-warning am-radius am-btn-sm" id="view-consumption">消费历史</a>
            </div>  
          </div>
          
        </form>
    </div>
    
    </div>
 </div>
</div>